package com.code.time1120;

public class SingletonTest {

	public static void main(String[] args) {
		Singleton s = Singleton.getInstance();
		Singleton s1 = Singleton.getInstance();
		Singleton2 s2 = Singleton2.getInstance();
		Singleton2 s3 = Singleton2.getInstance();
		System.out.println(s);
		System.out.println(s1);
		System.out.println(s2);
		System.out.println(s3);
		System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
		System.out.println(Enum.MAN);
		System.out.println(Enum.WOMAN);
		System.out.println(Enum.UNKOWEN);
		System.out.println("=======================");
		Enum e = Enum.MAN;
		switch (e) {
			case MAN:
				System.out.println("喜欢女人");
				break;
			case WOMAN:
				System.out.println("喜欢男人");
				break;
			case UNKOWEN:
				System.out.println("喜欢男女人");
				break;
			default:
				break;
		}
	}

}
